package com.platform.dbs.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

import java.io.Serializable;

/**
 * Description: Database column defined
 *
 * @author wxw created on 2019/9/20
 */
@NoArgsConstructor
@RequiredArgsConstructor
@Data
public class DbColumn implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = -5132364570981616064L;

    /**
     * 字段名
     */
    @NonNull
    private String name;

    /**
     * 数据类型
     */
    @NonNull
    private String dataType;

    /**
     * 是否可以为空
     */
    private Integer nullable;

    /**
     * 数据长度
     */
    private Integer dataLength;

    /**
     * 小数位数
     */
    private Integer dataPrecision;

    /**
     * 注释
     */
    private String comment;

    /**
     * 描述
     */
    private String desc;

    /**
     * 默认值
     */
    private String defaultValue;
}
